language: c
dist: trusty
sudo: true

matrix:
  include:
  - os: linux
    compiler: gcc
    env:
    - ENABLE_SIDH_IQC_REF=1
    - ENABLE_KEX_LWE_FRODO=0
    - ENABLE_KEX_MLWE_KYBER=0
    - ENABLE_KEX_SIDH_CLN16=0
    - ENABLE_SIG_PICNIC=0
    - USE_OPENSSL=1
    - ENABLE_KEX_RLWE_NEWHOPE_AVX2=1
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
    before_install:
    - sh .travis/install-clang-format-linux.sh
    - sh .travis/install_cmake3_8.sh
  - os: linux
    compiler: gcc
    env:
    - CC_OQS=gcc-4.9
    - ENABLE_SIG_PICNIC=0
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - gcc-4.9
    before_install:
    - sh .travis/install-clang-format-linux.sh
    - sh .travis/install_cmake3_8.sh
  - os: linux
    compiler: gcc
    env: CC_OQS=gcc-5
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - gcc-5
    before_install:
    - sh .travis/install-clang-format-linux.sh
    - sh .travis/install_cmake3_8.sh
  - os: linux
    compiler: gcc
    env:
    - CC_OQS=gcc-6
    - USE_OPENSSL=1
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - gcc-6
        - libssl-dev
    before_install:
    - sh .travis/install-clang-format-linux.sh
    - sh .travis/install_cmake3_8.sh
  - os: osx
    compiler: clang
    env:
    - CC_OQS=clang
    - AES_NI=0
    before_install:
    - brew update
    - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0c4314c499576b28e4c082b591228a8f940954c0/Formula/clang-format.rb
  - os: osx
    compiler: clang
    env:
    - CC_OQS=clang
    - AES_NI=0
    - USE_OPENSSL=1
    - OPENSSL_DIR=/usr/local/opt/openssl # openssl is a keg-only package
    - ENABLE_CODE_MCBITS=1
    - ENABLE_SIDH_IQC_REF=1
    before_install:
    - brew update
    - brew install libsodium
    - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0c4314c499576b28e4c082b591228a8f940954c0/Formula/clang-format.rb

script:
  - ./.travis-tests.sh
